package com.liuyi.tools.kits;

import java.util.Map;

/**
 * <p>
 * map生成器、解决你的一切烦恼
 * </p>
 *
 * @author Mr.Fmy
 * @since 2021-01-14
 */
public class MapBuilderKit<K, V> {

    private Map<K, V> map;

    private MapBuilderKit(Map<K, V> map) {
        this.map = map;
    }

    public static <K, V> MapBuilderKit<K, V> me(Map<K, V> map) {
        return new MapBuilderKit(map);
    }

    public MapBuilderKit<K, V> put(K k, V v) {
        map.put(k, v);
        return this;
    }

    public Map<K, V> builder() {
        return this.map;
    }
}
